<?php

$article = new Article();

if ($article->load_by_slug($definition[0])) {

	function the_title() {
		global $article;
		echo utf8_encode($article->title);
	}
	function the_content() {
		global $article;
		echo utf8_encode($article->get_content());
	}
	
	function the_article_json() {
		global $article;
?>
			idArticle: '<?php echo $article->get_id(); ?>',
			title: '<?php echo utf8_encode($article->get_title()); ?>',
			slug: '<?php echo $article->slug; ?>',
			content: '<?php echo utf8_encode($article->get_content()); ?>',
			idParent: '<?php echo $article->id_parent; ?>',
			creationTime: '<?php echo $article->creation_time; ?>',
			type: '<?php echo $article->type; ?>'
<?php
	}
	
} else {

	function the_title() {
		global $site;
		echo $site->lang("Not Found");
	}
	function the_content() {
		global $article;
		echo $article->_errmsg;
	}
	
	$cur_section = "404";
	
}

?>